Skip to content

Add annotations to return values#2

Open
SirTelemak wants to merge 1 commit intomicrosoft:masterfrom
SirTelemak:patch-1
Open

Add annotations to return values#2
SirTelemak wants to merge 1 commit intomicrosoft:masterfrom
SirTelemak:patch-1

Conversation

@SirTelemak
Copy link

I think it's nice to have annotation for return values :) I'd liked to use something instead of List[dict] but it feels kinda confusing to use List[Dict[str, Union[str, list]]. I'd use pydantic model here or dataclass, but it's overkill here imo

@kabirkhan
Copy link
Contributor

Sorry for the late review on this but thanks for taking an interest!

I'd prefer the more detailed type annotation rather than List[dict] but your point on just using Pydantic models is valid and I'd welcome that contribution if you'd like to make it.

Otherwise, I'll plan to update this repo with some best practice changes (like using Pydantic types all the way through) later this month or next month

@SirTelemak
Copy link
Author

Sure, I'll make PR using Pydantic models. Can't say when, but hope I'll have time this month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants